home *** CD-ROM | disk | FTP | other *** search
- INCLUDE HEADER FILES
-
-
- Four include header files are provided with the SmartFields system. These
- files must be installed in the include directory of your compiler work disk
- before you can compile any of the functions. See the "Getting Started"
- section for more details. The following section discusses in detail the
- definitions found in the console include files. Only the first line of each
- block of definitions is listed, so you may wish to have a printout of each
- include file handy when reading the following discussion.
-
- To speed up compilation, you should add these include files to your pre-
- compiled header files. If you are not using pre-compiled headers, you
- should, because the time savings can be anywhere from a few seconds if you
- are using a RAM disk to a few minutes if you are compiling off diskettes.
-
-
-
- console/console.h
- -----------------
-
- This include file contains all of the definitions required for the low-level
- console functions.
-
- struct ConsoleHeader {
-
- If you are using the console device but not any of the field
- functions for a window, this structure comes in handy because it
- contains all of pointers necessary to access the console functions.
- See the "Structure Definitions" section for more information.
-
- #define INIT_CONSOLE_HEADER NULL,NULL...
-
- Use this definition to pre-initialize all ConsoleHeader structures.
- This sets all pointers to NULL, indicating that none of the devices
- have been opened yet. This is important in case your program exits
- prematurely.
-
- #define ALT_SPACE_CODE 0xa0
-
- This block contains codes returned by the console device and codes
- used in command sequences output to the console device.
-
- #define CON_CONTROL 1000
-
- This block contains codes returned by the console_input() function to
- indicate which key was pressed by the user.
-
- #define CON_F 3000
- #define CON_SHIFT_F 3010
-
- These two blocks contain the codes returned by the console_input()
- and field_input() functions when the user presses a function key or
- shifted function key.
-
- #define CONSOLE_OPEN_OK 0
-
- This block contains the exit codes returned by the console_open()
- function. Passing this code to the exit() function will result in
- the message "...failed returncode..." to be displayed in the CLI
- window for programs run from the CLI. This is a handy debugging
- feature.
-
- #define CONSOLE_ERROR -1L
-
- This definition is used to indicate that either the console device
- has not been opened yet, or that an error occurred while trying to
- open it.
-
- #define CLOSE_CONSOLE(r) CloseDevice(r)
-
- This macro is used just to clarify the purpose of the CloseDevice()
- function contained in the field_close() function. You may wish to
- use this macro if you manually open and close your devices.
-
- #define FLASH_SCREEN DisplayBeep(0L)
-
- Another clarification macro, this makes porting slightly easier.
-
- #define CONSOLE_BUFFER_SIZE 200
-
- The console buffer should be defined by your calling program to (at
- least) this size. Note that you can also use this buffer for other
- purposes.
-
- #define TAB_JUMP 4
-
- This is the number of character positions that the cursor jumps when
- the user presses the TAB or shifted-TAB keys. If you wish, you may
- modify this value before compiling the SmartFields functions.
-
- #define INSERT_TYPE_MODE 1
-
- This block contains the values used to represent the current type
- modes as stored in the TypeMode parameter of the FieldHeader
- structure. Before compiling any of the SmartFields functions, you
- should set DEFAULT_TYPE_MODE to the desired value. This is the
- default value upon the startup of any program using SmartFields, and
- is stored in the FieldHeader structure by the field_open() function.
- Note that the type mode may be changed at any time by your calling
- program or by the user.
-
- #define SET_EVENTS '{'
-
- These two definitions are used by the con_events() function.
-
- #define CON_PLAIN 0x0000
-
- Use this block of definitions to initialize your Field structures and
- to change the graphic rendition of a field using the
- con_graphic_rend() function.
-
-
-
- console/fields.h
- ----------------
-
- This include file contains the structures and definitions required by the
- field functions in the SmartFields system.
-
- #define MASK_ELEMENTS 8
-
- This is the number of unsigned long integers required to make a 256-
- bit field mask.
-
- #define MASK_ENABLE 0x0001
-
- These two definitions are used by the mask_ functions not only as
- flags whether you want to enable or disable characters in the mask,
- but also to create the masks themselves.
-
- #define MASK_ENTIRE_DISABLED {0,0,0,0,0,0,0,0}
-
- Use these two definitions to pre-initialize every mask that you use.
- Remember that C does not automatically clear all variables and
- structures to zero.
-
- struct FieldMask {
-
- Each field mask must have its own FieldMask structure. See the
- "Structure Definitions" section for more information.
-
- #define FIELD_ENABLED 1
-
- For upward compatibility, use these two definitions when initializing
- the Field structures to indicate whether the field should be enabled
- or disabled.
-
- #define FIELD_CLIP_SIZE 80
-
- This is the size of the internal clip maintained by the SmartFields
- system. Since SmartFields does not allow hidden characters at this
- time, the largest possible field in a window using the default Topaz-
- 80 font would fit in a field clip of 80 characters. If you plan on
- using a thinner font of your own, increase this definition before
- compiling. Note that all of the clip functions check the size of the
- field clip to prevent the overwriting of succeeding locations in
- memory.
-
- struct Field {
-
- Each field in the SmartFields system must have a Field structure.
- See the "Structure Definitions" section for more information.
-
- struct FieldHeader (
-
- Each list of fields must have a FieldHeader structure to access most
- of the field functions. See the "Structure Definitions" section for
- more information.
-
- #define INIT_FIELD_HEADER NULL,NULL...
-
- Use this definition to pre-initialize all FieldHeader structures.
- This sets all pointers to NULL, indicating that none of the devices
- have been opened yet. This is important in case your program exits
- prematurely.
-
- #define FIELD_OPEN_OK 0
-
- This block contains the exit codes returned by the field_open()
- function. Passing this code to the exit() function will result in
- the message "...failed returncode..." for programs executed from the
- CLI. This is a handy debugging feature.
-
- #define FIELD_FIRST 1000
-
- This block contains codes returned by the field_input() function.
-
- #ifndef strcpy
-
- This block redefines the strcpy() and strlen() functions with the
- _BUILTIN_ prefix. This causes the code of these two functions to be
- built right into the calling code, resulting in smaller, faster code.
- Remove this block if the current version of your compiler does not
- support this feature.
-
-
-
- console/functions.h
- -------------------
-
- This include file declares all of the SmartFields functions so that you do
- not have line your source with declaration statements of your own. This will
- also cause most compilers to warn you if a SmartFields function is not
- returning what it is supposed to.
-
-
-
- toolkit/toolkit.h
- -----------------
-
- This include file contains a few #typedef's and #define's. If you already
- have a copy of the toolkit/toolkit.h header file from your Software
- Ingenuity's C Toolkit, DO NOT replace it with the version supplied with this
- system, for it is only a subset of the version supplied with the C Toolkit.
-
-
- Include Files 01/13/90
- © Copyright 1990 Timm Martin
- All Rights Reserved Worldwide
-
- /*-- END --*/
-